home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Adobe Graphics & Publishing SDK 1996 December
/
Adobe Graphics & Publishing SDK 1996 December.iso
/
mac
/
Premiere 4.2 SDK r3 Mac
/
Examples
/
.h files
/
PremiereInterface.h
< prev
next >
Wrap
Text File
|
1996-01-25
|
22KB
|
556 lines
//========================================================================================
//
// PremiereInterface.h - Adobe Premiere¬ include file.
//
// Part of the Adobe Premiere¬ 4.2 Plug-In Developer's Toolkit.
//
// Header file written 10/20/93 by Bryan K. ╥Beaker╙ Ressler.
//
// Copyright ⌐ 1992-96, Adobe Systems Incorporated, all rights reserved worldwide.
//
// Version 1.00 10/20/93 Original version.
// Version 1.01 9/12/94 Updated for 4.0.
// Version 1.02 11/6/95 Updated for Premiere 4.2 and CodeWarrior7 - See 4.2
// comments below.
//
//========================================================================================
// NOTE: When this file is included by a CodeWarrior project which compiles to 68K code,
// you must turn on MPW C Calling Conventions in the 68K preferences section.
// START~ SUBS-Blocks
//╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
// These are the track ID's
enum {
tVideoA = 0,
tVideoB,
tVideoSuper,
tFX1,
tAudioA,
tAudioB,
tAudioC
};
// These are the currently defined block types
enum {
// Type ID Parent Data Description
// ---------- ------ ---------- ---------------------------------- --------------------------------
bBLOK = 'BLOK', // 0 none (L)wrk strt, (L)wrk end, sub-blks Container for everything
bTRKB = 'TRKB', // 0 BLOK track blocks Container for all of the tracks
bTRAK = 'TRAK', // ID TRKB (S)flags, TREC blocks Contains all of the blocks for an entire track
bFVID = 'FVID', // 0 TRAK none indicates that a track contains video records
bFSUP = 'FSUP', // 0 TRAK none indicates that a track contains superimpose records
bFAUD = 'FAUD', // 0 TRAK none indicates that a track contains audio records
bAMAP = 'AMAP', // 0 FAUD (S)mapping bits bits indicate target tracks
bFF_X = 'FF_X', // 0 TRAK none indicates that a track contains F/X records
bTREC = 'TREC', // n TRAK (S)clipID,(L)strt,(L)end,sub-blocks Contains the blocks for a single track item
bRBND = 'RBND', // 0 TREC (S)max, RPNT blocks [optional] The rubber band info for a track item
bRPNT = 'RPNT', // 0-n RBND (L)h, (S)v rubber band point
bFXOP = 'FXOP', // 0 TREC (C)crnr,(C)dir,(S)strt,(S)end,blks [optional] The options controlling F/X options
bFXDF = 'FXDF', // 0 FXOP OSType the base type of the effect
bEDGE = 'EDGE', // 0 FXOP (S)thickness, COLR block [optional] describes edge thickness
bMPNT = 'MPNT', // 0 FXOP Point [optional] reference point for next to types
bSPNT = 'SPNT', // 0 FXOP Point [optional] user specified open point
bEPNT = 'EPNT', // 0 FXOP Point [optional] user specified close point
bOVER = 'OVER', // 0 TREC (S)type, info blocks [optional] The parameters for an overlay item
bCOLR = 'COLR', // 0 OVER,FILE RGBColor [optional] key or fill color
bSIMI = 'SIMI', // 0 OVER (S)similarity [optional] similarity value
bBLND = 'BLND', // 0 OVER (S)blend [optional] blend value
bTHRS = 'THRS', // 0 OVER (S)threshold [optional] threshold value
bCUTO = 'CUTO', // 0 OVER (S)cutoff [optional] cutoff value
bALIA = 'ALIA', // 0 OVER (S)level [optional] anti-aliasing level
bSHAD = 'SHAD', // 0 OVER none [optional] if present, shadowing is on
bRVRS = 'RVRS', // 0 OVER none [optional] if present, key is reversed
bGARB = 'GARB', // 0 OVER (R)ref rect,point blocks garbage matte points
bPONT = 'PONT', // 0-n GARB,RBND Point
bMATI = 'MATI', // 0 OVER (S)clipID [optional] The ID of the clip describing an overlay Matte
bVFLT = 'VFLT', // 0 TREC sub-blocks [optional] followed by individual filter blocks
bAFLT = 'AFLT', // 0 TREC sub-blocks [optional] followed by individual filter blocks
bFILT = 'FILT', // 0-n VFLT,AFLT (S)fileID,data block The (short) fileID, followed by a variable amount of data
bMOTN = 'MOTN', // 0 TREC (R)ref rect,sub blocks [optional] A record describing the motion path for a track item
bSMTH = 'SMTH', // 0 MOTN none If present, motion path is smoothed
bMREC = 'MREC', // 0-n MOTN (S)zoom,(P)spot,(P)dest[4] describes each motion point
bDATA = 'DATA', // 0 any data block [optional]generic data block, for storing parameter handles
bCLPB = 'CLPB', // 0 BLOK clip blocks Contains all of the clip blocks
bCLIP = 'CLIP', // ID CLPB (S)fileID,(L)in,(L)out the descriptive info for a clip
bMARK = 'MARK', // 0-9 CLIP (L)location [optional] For set markers, defines the markers
bLOCK = 'LOCK', // 0 CLIP none [optional] If present, clip has locked aspect
bRATE = 'RATE', // 0 CLIP (S)rate * 100 [optional] Defines a rate other than 1.00
bFILB = 'FILB', // 0 BLOK file blocks Contains all of the file blocks
bFILE = 'FILE', // ID FILB info blocks the descriptive blocks for a file
bMACS = 'MACS', // 0 FILE FSSpec the mac file spec
bMACP = 'MACP', // 0 FILE string the full mac pathname
bFRMS = 'FRMS', // 0 FILE (L)#frames [optional] number of frames for a file w/content
bVIDI = 'VIDI', // 0 FILE (L)video frame,(S)depth [optional] Describes the video portion of the file
bAUDI = 'AUDI', // 0 FILE (S)aud flags,(L)aud rate [optional] Describes the audio portion of the file
bTIMC = 'TIMC', // 0 FILE timecode [optional] Specifies the timecode for the first file frame
bTIMB = 'TIMB', // 0 FILE (L)frame,(C)dropframe,(C)format [optional] Specifies the binary timecode, as above
bREEL = 'REEL' // 0 FILE (STR)reel name [optional] String describing the source reel for the file
};
// These are the structures for the static data for several of the blocks
typedef struct {
long start; // starting position for the work area
long end; // ending position for the work area
} Rec_BLOK;
typedef struct {
short fileID; // the dependent file ID
long in; // the IN point within the source material
long out; // the OUT point within the source material minus 1
} Rec_CLIP;
typedef struct {
short clipID; // the dependent clip ID
long start; // the clip starting position
long end; // the clip ending position
} Rec_TREC;
typedef struct {
short zoom; // zoom factor 1 to 400, 100 is normal
short time; // time location 1 to 1000
short rotation; // rotation factor -360 to 360, 0 is normal
short delay; // delay factor 0 to 100, 0 is normal
Point spot; // the center point for the image at this point
} Rec_MREC;
typedef struct {
unsigned char corners; // the 'corner' flags, one bit each, from the user settings for the effect
char direction; // the direction flag, 0= A-->B, 1=B-->A
short startPercent; // starting percentage times 100
short endPercent; // ending percentage times 100
} Rec_FXOP;
typedef struct {
long h;
short v;
} Rec_RPNT;
typedef struct {
Rect frame; // bounding frame for video data
short depth; // bit depth for video data
} Rec_VIDI;
typedef struct {
long frames; // binary frame count
char dropframe; // true = DF, false = NDF
char format; // true = NTSC(30), false = PAL(25), 2=Film(24)
} Rec_TIMB;
// These are the basic effect types, each effect falls back to one of these
enum {
fDISS = 'DISS', // cross dissolve
fTAKE = 'TAKE', // 'take' or cut
fWI00 = 'WI00', // vertical wipe from the left edge
fWI01 = 'WI01', // horizontal wipe from the top edge
fWI02 = 'WI02', // vertical wipe from the right edge
fWI03 = 'WI03', // horizontal wipe from the bottom edge
fWI04 = 'WI04', // diagonal wipe from upper left corner
fWI05 = 'WI05', // diagonal wipe from upper right corner
fWI06 = 'WI06', // diagonal wipe from lower right corner
fWI07 = 'WI07', // diagonal wipe from lower left corner
fWI08 = 'WI08', // vertical split wipe
fWI09 = 'WI09', // horizontal split wipe
fWI10 = 'WI10', // horizontal/vertical split wipe
fWI11 = 'WI11', // box wipe out from the center
fWI12 = 'WI12', // circular wipe from the center
fWI13 = 'WI13', // inset wipe from upper left
fWI14 = 'WI14', // inset wipe from upper right
fWI15 = 'WI15', // inset wipe from lower right
fWI16 = 'WI16' // inset wipe from lower left
};
// START~ Int-Devices
// These are the definitions for device control plug-ins
typedef pascal char (*CallBackPtr)(void);
// The main info record
#ifdef PrPPC
enum {
uppPauseProcInfo = kPascalStackBased,
uppResumeProcInfo = kPascalStackBased,
uppCallBackPtrInfo = kPascalStackBased | RESULT_SIZE(SIZE_CODE(sizeof(char)))
};
#endif
typedef struct {
Handle deviceData; // private data which the plug-in creates
short command; // command to perform
short mode; // mode command and status
long timecode; // timecode command and status: -1 = N/A, -2 = blank
short timeformat; // 0=non-drop, 1=drop-frame
short timerate; // fps for the timecode above
long features; // feature bits from the features command
short error; // error code from any routine
short preroll; // pre-roll time (secs) for cmdLocate
CallBackPtr callback; // callback for cmdLocate, returns non-zero to stop
ProcPtr PauseProc; // callback to pause current operations
ProcPtr ResumeProc; // callback to restart current operations
} DeviceRec, **DeviceHand;
// Codes sent to plug-in interface
enum {
dsInit = 0, // Create any structure(s), pick an operating mode, no dialogs here
dsSetup, // prompt for any user dialogs
dsExecute, // perform command
dsCleanup, // dispose any allocated structure(s)
dsRestart, // re-start any features, used at program startup to reconnect device
dsQuiet // 4.2 - disconnect from device but DON'T dispose allocated structures
};
// Commands which plug-in can perform
enum {
cmdGetFeatures = 0, // return feature bits
cmdStatus, // fill in current mode and timecode, gets called repeatedly
cmdNewMode, // change to the mode in 'mode'
cmdGoto, // goto the timecode specified in 'timecode'
cmdLocate, // find the timecode in 'timecode' and then return (with deck in play)
cmdShuttle, // shuttle at rate specified in 'mode', from -100 to +100
cmdJogTo, // position at 'timecode', quickly from the current location
cmdJog, // 4.2 - Jog at rate specified in 'mode', from -25 to +25
cmdEject // 4.2 - eject media
};
// Feature bits
enum {
fDrvrQuiet = 0x00040000, // driver supports a quiet mode --- NEW in 4.2
fHasJogMode = 0x00020000, // device has jog capabilities --- NEW in 4.2
fCanEject = 0x00010000, // can Eject media --- NEW in 4.2
fStepFwd = 0x00008000, // can step forward
fStepBack = 0x00004000, // can step back
fRecord = 0x00002000, // can record
fPositionInfo = 0x00001000, // returns position info
fGoto = 0x00000800, // can seek to a specific frame (fPositionInfo must also be set)
f1_5 = 0x00000400, // can play at 1/5 speed
f1_10 = 0x00000200, // can play at 1/10 speed
fBasic = 0x00000100, // supports Stop,Play,Pause,FastFwd,Rewind
fHasOptions = 0x00000080, // plug-in puts up an options dialog
fReversePlay = 0x00000040, // supports reverse play
fCanLocate = 0x00000020, // can locate a specific timecode
fStillFrame = 0x00000010, // device is frame addressable, like a laser disc
fCanShuttle = 0x00000008, // supports the Shuttle command
fCanJog = 0x00000004 // supports the JogTo command
};
// Mode commands/states
enum {
modeStop = 0,
modePlay,
modePlay1_5,
modePlay1_10,
modePause,
modeFastFwd,
modeRewind,
modeRecord,
modeGoto,
modeStepFwd,
modeStepBack,
modePlayRev,
modePlayRev1_5,
modePlayRev1_10
};
// START~ Int-Effects
//╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
// Effect callback prototypes
typedef pascal short (*FXCallBackProcPtr) (long frame, short track, CGrafPtr thePort,
Rect *theBox, Handle privateData);
#ifdef PrPPC
enum {
uppFXCallBackProcPtrInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(CGrafPtr)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(Rect *)))
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(Handle)))
};
#endif
//╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
// Effect Data Structure
typedef struct {
Handle specsHandle; // specification handle
GWorldPtr source1; // source GWorld #1
GWorldPtr source2; // source GWorld #2
GWorldPtr destination; // Destination GWorld
long part; // part / total = % complete
long total;
char previewing; // obsolete
unsigned char arrowFlags; // flags for direction arrows
char reverse; // is effect being reversed?
char source; // are sources swapped?
Point start; // starting point for effect
Point end; // ending point for effect
Point center; // the reference center point
Handle privateData; // Editor private data handle
FXCallBackProcPtr callBack; // callback, not valid if nil
BottleRec *bottleNecks; // botleneck callback routines
short version;
short sizeFlags;
long flags;
short fps;
} EffectRecord, **EffectHandle;
typedef struct {
EffectRecord common; // common fields;
Media sourceMedia1; // Media which contains source sample 1
long sourceTime1; // time value for source sample 1, in media time scale
Media sourceMedia2; // Media which contains source sample 2
long sourceTime2; // time value for source sample 2, in media time scale
Handle sourceDesc1; // ImageDescriptionHandle for source data 1
Handle sourceDesc2; // ImageDescriptionHandle for source data 2
Handle destDesc; // ImageDescriptionHandle for destination data
Handle sourceData1; // source data 1
Handle sourceData2; // source data 2
Handle destData; // returned processed data
} DirectEffectRecord, **DirectHandle;
// Selector messages
enum {
esExecute = 0,
esSetup,
esAbout,
esCanHandleComp,
esProcessComp
};
enum {
dfCantHandle = 0, // returned if not valid content for fx
dfCanHandle, // can perform, wants data supplied
dfCanHandleNoData // can perform, will get data directly
};
// Effect Corner Bits
enum {
bitTop = 0x01,
bitRight = 0x02,
bitBottom = 0x04,
bitLeft = 0x08,
bitUpperRight = 0x10,
bitLowerRight = 0x20,
bitLowerLeft = 0x40,
bitUpperLeft = 0x80
};
typedef pascal short (*EffectProcPtr) (short selector, EffectHandle theData);
// START~ Int-Export
//╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
// EDL Export Data Structure
typedef struct {
Handle dataHandle; // data handle
short timeBase; // current default timebase
StringPtr projectName; // pointer to current project name
} ExportRecord, **ExportHandle;
typedef pascal short (*ExportProcPtr) (short selector, ExportHandle theData);
// Selector messages
enum {
exExecute = 0,
exTrue30fps
};
//╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
// Data Export Data Structure
enum {
aflag5KHz = 0x0001,
aflag11KHz = 0x0002,
aflag22KHz = 0x0004,
aflag44KHz = 0x0008,
aflagSpecial = 0x0040,
aflagStereo = 0x0100,
aflag16Bit = 0x0200,
aflagDropFrame = 0x0400
};
// Callback to get one frame of video
typedef pascal short (*GetVidCallBack) (long frame, GWorldPtr thePort, Rect *theBox, Handle privateData);
// Callback to get one second of audio
typedef pascal short (*GetAudCallBack) (long second, short formatFlags, Ptr buffer, Handle privateData);
#ifdef PrPPC
enum {
uppGetVidCallBackProcPtrInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(GWorldPtr)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Rect *)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(Handle))),
uppGetAudCallBackProcPtrInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(Handle)))
};
#endif
typedef struct {
long markers[12]; // clip markers
long numframes; // number of frames in the clip
short framerate; // frames per second of source material
Rect bounds; // the video bounding frame, empty if no video
short audflags; // the audio flags (above), zero if no audio
long audrate; // the audio rate in Hz
GetVidCallBack getVideo; // video reader callback
GetAudCallBack getAudio; // audio reader callback
Handle privateData; // private data passed to above routines
long specialRate; // special rate
} DataExportRec, **DataExportHandle;
enum {
edExecute = 0
};
typedef pascal short (*DataExportProcPtr) (short selector, DataExportHandle theData);
// START~ Int-Filters
//╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
// Filter callback prototype
typedef pascal short (*VFilterCallBackProcPtr) (long frame, CGrafPtr thePort, Rect *theBox, Handle privateData);
typedef pascal short (*AFilterCallBackProcPtr) (long sample, long count, Ptr buffer, Handle privateData);
#ifdef PrPPC
enum {
uppVFilterCallBackProcPtrInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(CGrafPtr)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Rect *)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(Handle))),
uppAFilterCallBackProcPtrInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(Handle)))
};
#endif
//╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
// Filter Data Structure
typedef struct {
Handle specsHandle; // settings for this filter
GWorldPtr source; // source pixels
GWorldPtr destination; // dest pixels
long part; // how far have we come
long total; // how much will we do
char previewing; // obsolete
Handle privateData; // private to callback
VFilterCallBackProcPtr callBack; // callback for other frame data
BottleRec *bottleNecks; // utility routines
short version; // version of struct (now 2 in ver>4.2)
short sizeFlags; // flags for field/other processing
long flags; // more flags
short fps; // fps of source project timebase
// 4.2 changes -- njs
Handle InstanceData; // private data for filter - set to non-nil
// and Premiere will preserve at compile time.
} VideoRecord, **VideoHandle;
typedef struct {
Handle specsHandle; // settings for this filter
Ptr source; // source sample buffer
Ptr destination; // destination sample buffer
long samplenum; // sample number we're at
long samplecount; // how many to do
char previewing; // obsolete
Handle privateData; // used by callback
AFilterCallBackProcPtr callBack; // call back for other samples in file
long totalsamples; // total samples in file
short flags; // 16bit/stereo flags
long rate; // sample rate
BottleRec *bottleNecks; // handle to bottleneck callbacks
short version; // version of struct (now 2 in ver>4.2)
long extraFlags; // more flags
short fps; // fps of source project timebase
// 4.2 changes -- njs
Handle InstanceData; // private data for filter - set to non-nil
// and Premiere will preserve at compile time.
} AudioRecord, ** AudioFilter;
// Selector messages
enum {
fsExecute = 0,
fsSetup,
fsDisposeData // 4.2 changes -- njs
};
typedef pascal short (*FilterProcPtr) (short selector, Handle theData);
// START~ Int-Zoom
// Definitions for video board zooming modules
typedef struct {
GDHandle theDevice; // GDevice of board to zoom
short boardID; // the boardID of the video card
Handle zoomData; // used by module during zoomIn and Out
short mode; // screen mode is passed in/out here
} ZoomRec, **ZoomHand;
enum {
cmdCanZoom = 1, // return 1 if this module can zoom this card
cmdZoomIn, // Set card to x2 zoom mode, remember old settings in zoomData
cmdZoomOut, // Put the card back the way it was, dispose of zoomData
cmdCanDo, // Returns true if this module handles this card
cmdGetSupportedModes, // returns bits representing the supported modes
cmdGetMode, // return the current mode
cmdSetMode, // the the card's mode (NTSC, PAL, etc.)
cmdPlayMovie // play a movie in some special way
};
enum {
modeNTSC = 0x0001,
modePAL = 0x0002,
modeNTSC443 = 0x0004
};
// START~ Int-Effects
short Effect (short fileID, short selector, EffectHandle theData);
short CallPlugIn (short fileID, short selector, Handle theData);
short DataExport (short fileID, short selector, DataExportHandle theData);
short Filter (short fileID, short selector, Handle theData);
// START~ SUBS-Blocks
// START~ SUBS
// Used to be BeakerGlue.c stuff
Movie GetExportMovie (DataExportHandle exportData);
void GetExportFSSpec (DataExportHandle exportData, FSSpec *theSpec);
short GetExportClipID (DataExportHandle exportData);
short GetExportDivisor (DataExportHandle exportData);
short GetExportFPS (DataExportHandle exportData);
void GetWipeCodes (long *codes);
void EditWipeCodes (void);